package com.wanxi.hashmap;

import java.util.*;

public class SingsList {
    public static void main(String[] args) {
        HashMap sing = new HashMap<>();

        String singer1 = "陈明";
        ArrayList song1 = new ArrayList<>();
        song1.add("你好");
        song1.add("你df好");
        song1.add("你df好");
        song1.add("你好ftf");
        song1.add("你d好d");

        String singer2 = "王海云";
        ArrayList song2 = new ArrayList<>();
        song2.add("你好对方");
        song2.add("你df的方法的好");
        song2.add("你df好反对法");
        song2.add("你反对好ftf");
        song2.add("你d发股份认购好d");

        sing.put(singer1,song1);
        sing.put(singer2,song2);

//        Set set = sing.keySet();
//        Collection values = sing.values();


        Set entrySet = sing.entrySet();





        Iterator iterator = entrySet.iterator();
        while (iterator.hasNext()){
            Map.Entry sings = (Map.Entry) iterator.next();


            System.out.println("歌手: "+sings.getKey());
            System.out.println("歌曲: "+sings.getValue());
        }


    }
}
